package org.database.filter.exception;

public class InvalidParameterException extends RuntimeException
{

	private static final long serialVersionUID = -102327874311964084L;

	public InvalidParameterException()
	{
		super();
	}

	public InvalidParameterException(String arg0, Throwable arg1)
	{
		super(arg0, arg1);

	}

	public InvalidParameterException(String... invalidParamters)
	{
		super(getErrorMessage(invalidParamters));
	}

	public InvalidParameterException(Throwable arg0)
	{
		super(arg0);
	}

	private static String getErrorMessage(String... invalidParameters)
	{
		StringBuilder buider = new StringBuilder();
		buider.append("Invalid Parameter: ");
		for (String param : invalidParameters)
		{
			buider.append(param).append(",");
		}
		return buider.toString();
	}
}
